<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@include file="/includes.jsp"%>

<div class="layout">
    <table class="styled" cellspacing="0">
        <tr>
            <th class="styled">Node</th>
            <th class="styled">User</th>
            <th class="styled">Role</th>
            <th class="styled">Delete?</th>
        </tr>
        <logic:iterate name="userAccessByNode" id="access">
            <tr>
                <td class="styled">
                    <html:link action="showNode.do" paramId="nodeId" paramName="access" paramProperty="node.id">
                        <beans:write name="access" property="node.pathName"/>
                    </html:link>
                </td>
                <td class="styled"><beans:write name="access" property="accessorName"/></td>
                <td class="styled">
                    <html:link action="showNode.do" paramId="nodeId" paramName="access" paramProperty="role.id">
                        <beans:write name="access" property="role"/>
                    </html:link>
                </td>
                <html:form action="useraccess.do?method=deleteCheck" method="post">
                    <html:hidden name="access" property="accessId"/>
                    <td class="styled" style="text-align: center;">
                        <logic:equal name="access" property="deletable" value="true">
                            <html:submit property="btnDelete" value="Delete"/>
                        </logic:equal>
                        <logic:notEqual name="access" property="deletable" value="true">
                            No permission
                        </logic:notEqual>
                    </td>
                </html:form>
            </tr>
        </logic:iterate>
    </table>
</div>